package com.bwie.controller;

import com.bwie.pojo.OrderTaking;
import com.bwie.service.OrderTakingService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author lenovo
 */
@RestController
@RequestMapping("/orderTaking")
public class OrderTakingController {

    @Autowired
    private OrderTakingService orderTakingService;

    @PostMapping("/list")
    public R list() {
        List<OrderTaking> list = orderTakingService.list();
        return R.OK(list);
    }

    @RequestMapping("/updateStatus/{id}")
    public R updateStatus(@PathVariable Integer id) {
        return orderTakingService.updateId(id);
    }
}
